//
//  SelePayTypeTableViewCell.swift
//  ZNZXSuperMarket
//
//  Created by 四川中农 on 2018/8/21.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class SelePayTypeTableViewCell: UITableViewCell {
    
    @IBOutlet weak var onLineImageV: UIImageView!
    @IBOutlet weak var huodaofukuanImageV: UIImageView!
    
    // 订单类型 0立即支付 1货到付款
    
    var backPayType:BackIntValue!
    

    override func awakeFromNib() {
        super.awakeFromNib()
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    // MARK:在线支付
    @IBAction func onLineClick(_ sender: UIButton) {
        self.onLineImageV.isHighlighted = true
        self.huodaofukuanImageV.isHighlighted = false
        if self.backPayType != nil {
            self.backPayType(0)
        }
    }
    
    // MARK:货到付款
    @IBAction func huodaofukuanClick(_ sender: UIButton) {
        self.onLineImageV.isHighlighted = false
        self.huodaofukuanImageV.isHighlighted = true
        if self.backPayType != nil {
            self.backPayType(1)
        }
    }
}
